#pragma once

#include <vector>
struct IDirect3DDevice9;

class D3DXVolumeTextureSaver
{
public:
	D3DXVolumeTextureSaver();
	~D3DXVolumeTextureSaver();

	bool SaveToVolumeTexture(
		const std::vector<float>& r,
		const std::vector<float>& g,
		const std::vector<float>& b,
		const wchar_t* outputFile
		);

/*
* The plane image of the 3x3x3 cube.
*    ----------------------------
*    |        |        |        |
*    |  3X3   |        |        |
*    |        |        |        |
*    ----------------------------
*    |        |        |        |
*    |        |        |        |
*    |        |        |        |
*    ----------------------------
*    |        |        |        |
*    |        |        |        |
*    |        |        |        |
*    ----------------------------
*/

	bool SaveToCubeTexture(
		const uint8_t* pData,
		const int cubeSize,
		const wchar_t* outputFile
	);

	bool SaveCubeToPlaneTexture(const wchar_t* outputFile);

private:
	IDirect3DDevice9* m_Device;
};

